package cn.com.sueframe.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.derby.client.am.SqlException;

import cn.com.sueframe.dao.CompanyInfoDao;
import cn.com.sueframe.service.CompanyInfoService;
import cn.com.sueframe.vo.CertificationVO;
import cn.com.sueframe.vo.CompanyVO;
import cn.com.sueframe.vo.GoodsVO;
import cn.com.sueframe.vo.OrderMenuVO;
import cn.com.sueframe.vo.PageVO;
import cn.com.sueframe.vo.PicVO;
import cn.com.sueframe.vo.TopPicVO;
import cn.com.sueframe.vo.UserVO;
/**
 * 用来完成公司基本信息业务逻辑操作
 * @author anmin
 * Create 2013-3-26
 */
public class CompanyInfoServiceImpl implements CompanyInfoService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8853609611421545803L;
	/**
	 * 公司信息操作dao层服务
	 */
	private CompanyInfoDao companyInfoDao;
	/**
	 * 查找公司信息
	 * @return
	 * @throws SqlException
	 * Create 2013-3-26
	 * @throws SQLException 
	 */
	public CompanyVO findCompanyInfo() throws SQLException{
		return companyInfoDao.findCompanyInfo();
	}
	
	 /**
	 * 用来查找公司信息
     * @author anmin
     * Create 2013-4-6
     */
	@Override
	public List<Object> findGoodsTypeInfo(String language)throws SQLException {
		return companyInfoDao.findGoodsTypeInfo(language);
	}
	
	
	public CompanyInfoDao getCompanyInfoDao() {
		return companyInfoDao;
	}

	public void setCompanyInfoDao(CompanyInfoDao companyInfoDao) {
		this.companyInfoDao = companyInfoDao;
	}
	/**
	 *查找公司首页信息
	 *@author anmin
	 *Create 2013-4-14 
	 */
	@Override
	public CompanyVO findHomeInfo(String language) throws SQLException {
		return companyInfoDao.findHomeInfo(language);
	}
    /**
     * 查找商品
     * @author anmin
     * Create 2013-4-15
     */
	@Override
	public List<Object> findGoods(PageVO pageVO) throws SQLException {
		return companyInfoDao.findGoods(pageVO);
	}
	
	 /**
     * 查找商品
     * @author anmin
     * Create 2013-4-15
     */
	@Override
	public Integer findGoodsCount(PageVO pageVO) throws SQLException {
		return companyInfoDao.findGoodsCount(pageVO);
	}
	 /**
     * 查找单个商品
     * @author anmin
     * Create 2013-5-2
     */
	@Override
	public GoodsVO findSingleGoods(GoodsVO goodsVO) throws SQLException {
		return companyInfoDao.findSingleGoods(goodsVO);
	}
	/**
	  * 保存用户信息
	  * @author anmin
	  * @return
	  * Created 2013-5-7
	  */
	@Override
	public void saveUserInfo(UserVO userVO) throws SQLException {
		companyInfoDao.saveUserInfo(userVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#checkUserEmai(cn.com.sueframe.vo.UserVO)
     */
	@Override
	public String checkUserEmail(UserVO userVO) throws SQLException {
		return companyInfoDao.checkUseEmail(userVO);
	}
 /*
  * (non-Javadoc)
  * @see cn.com.sueframe.service.CompanyInfoService#checkUserInfo(cn.com.sueframe.vo.UserVO)
  */
	@Override
	public String checkUserInfo(UserVO userVO) throws SQLException {
		return companyInfoDao.checkUserInfo(userVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findUserNo(java.util.Map)
     */
	@Override
	public String findUserNo(Map<String, String> userInfo) throws SQLException {
		return companyInfoDao.findUserNo(userInfo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#addGoodsToCart(cn.com.sueframe.vo.GoodsVO)
     */
	@Override
	public void addGoodsToCart(GoodsVO goodsVO) throws SQLException {
		companyInfoDao.addGoodsToCart(goodsVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#isGoodsExistsInCart(java.lang.String)
     */
	@Override
	public Integer isGoodsExistsInCart(Map<String,String> isExistsCond) throws SQLException {
		return companyInfoDao.isGoodsExistsInCart(isExistsCond);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#updateGoodsCountFromCart(java.lang.String)
     */
	@Override
	public void updateGoodsCountFromCart(Map<String,String> goodsInfo) throws SQLException {
		companyInfoDao.updateGoodsCountFromCart(goodsInfo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findGoodsFromCart(cn.com.sueframe.vo.PageVO)
     */
	@Override
	public List<Object> findGoodsFromCart(PageVO page) throws SQLException {
		return companyInfoDao.findGoodsFromCart(page);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findGoodsFromCartCount(cn.com.sueframe.vo.PageVO)
     */
	@Override
	public Integer findGoodsFromCartCount(PageVO page) throws SQLException {
		return companyInfoDao.findGoodsFromCartCount(page);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#saveGoodsCountToCart(cn.com.sueframe.vo.GoodsVO)
     */
	@Override
	public void saveGoodsCountToCart(GoodsVO goodsVO) throws SQLException {
		companyInfoDao.saveGoodsCountToCart(goodsVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findRemainGoods(cn.com.sueframe.vo.GoodsVO)
     */
	@Override
	public String findRemainGoods(GoodsVO goodsVO) throws SQLException {
		return companyInfoDao.findRemainGoods(goodsVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#caculateTotalPrice(java.lang.String)
     */
	@Override
	public String caculateTotalPrice(String userNo) throws SQLException {
		return companyInfoDao.caculateTotalPrice(userNo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#reduceGoodsFromCartOneByOne(java.util.Map)
     */
	@Override
	public void reduceGoodsFromCartOneByOne(Map<String, String> goodsInfo)throws SQLException {
		companyInfoDao.reduceGoodsFromCartOneByOne(goodsInfo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#deleteGoodsFromCart(java.util.Map)
     */
	@Override
	public void deleteGoodsFromCart(Map<String, String> goodsInfo)throws SQLException {
		companyInfoDao.deleteGoodsFromCart(goodsInfo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#saveOrderInfo(cn.com.sueframe.vo.OrderMenuVO)
     */
	@Override
	public void saveOrderInfo(OrderMenuVO orderMenuVO) throws SQLException {
		companyInfoDao.saveOrderInfo(orderMenuVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#updateGoodsCart4OrderMenu(java.util.Map)
     */
	@Override
	public void updateGoodsCart4OrderMenu(Map<String, String> goodsCartInfo)throws SQLException {
		companyInfoDao.updateGoodsCart4OrderMenu(goodsCartInfo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findOrderInfo(java.lang.String)
     */
	@Override
	public OrderMenuVO findOrderInfo(String id) throws SQLException {
		return companyInfoDao.findOrderInfo(id);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findOrderInfoGrdData(cn.com.sueframe.vo.PageVO)
     */
	@Override
	public List<Object> findOrderInfoGrdData(PageVO pageVO)throws SQLException {
		return companyInfoDao.findOrderInfoGrdData(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findOrderInfoGrdDataCount(cn.com.sueframe.vo.PageVO)
	 */
//	@Override
	public Integer findOrderInfoGrdDataCount(PageVO pageVO) throws SQLException {
		return companyInfoDao.findOrderInfoGrdDataCount(pageVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findGoodsIdFromCart(java.lang.String)
     */
	@Override
	public List<String> findGoodsIdFromCart(String userNo) throws SQLException {
		return companyInfoDao.findGoodsIdFromCart(userNo);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findGoodsNos(cn.com.sueframe.vo.GoodsVO)
     */
	@Override
	public List<Object> findGoodsNos(GoodsVO goodsVO) throws SQLException {
		return companyInfoDao.findGoodsNos(goodsVO);
	}
   /*
    * (non-Javadoc)
    * @see cn.com.sueframe.service.CompanyInfoService#findGoodsByType(cn.com.sueframe.vo.PageVO)
    */
	@Override
	public List<Object> findGoodsByType(PageVO pageVO) throws SQLException {
		return companyInfoDao.findGoodsByType(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findGoodsByCondition(cn.com.sueframe.vo.PageVO)
	 */
	@Override
	public List<Object> findGoodsByCondition(PageVO pageVO) throws SQLException {
		return companyInfoDao.findGoodsByCondition(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findGoodsByConditionCount(cn.com.sueframe.vo.PageVO)
	 */
	@Override
	public int findGoodsByConditionCount(PageVO pageVO) throws SQLException {
		return companyInfoDao.findGoodsByConditionCount(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findCertificationInfo(cn.com.sueframe.vo.PageVO)
	 */
	@Override
	public List<Object> findCertificationInfo(PageVO pageVO)throws SQLException {
		return companyInfoDao.findCertificationInfo(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findCertificationInfoCount(cn.com.sueframe.vo.PageVO)
	 */
	@Override
	public int findCertificationInfoCount(PageVO pageVO) throws SQLException {
		return companyInfoDao.findCertificationInfoCount(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findSingleCertification(java.lang.String)
	 */
	@Override
	public CertificationVO findSingleCertification(String id)throws SQLException {
		return companyInfoDao.findSingleCertification(id);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findAlbum(cn.com.sueframe.vo.PageVO)
	 */
	@Override
	public List<Object> findAlbum(PageVO pageVO) throws SQLException {
		return companyInfoDao.findAlbum(pageVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findAlbumCount()
     */
	@Override
	public int findAlbumCount() throws SQLException {
		return companyInfoDao.findAlbumCount();
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findPicList(cn.com.sueframe.vo.PageVO)
	 */
	@Override
	public List<Object> findPicList(PageVO pageVO) throws SQLException {
		return companyInfoDao.findPicList(pageVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findPicListCount(cn.com.sueframe.vo.PageVO)
     */
	@Override
	public int findPicListCount(PageVO pageVO) throws SQLException {
		return companyInfoDao.findPicListCount(pageVO);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findSinglePic(java.lang.String)
	 */
	@Override
	public PicVO findSinglePic(String picNo) throws SQLException {
		return companyInfoDao.findSinglePic(picNo);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findPicNos(java.lang.String)
	 */
	@Override
	public List<Object> findPicNos(String albumNo) throws SQLException {
		return companyInfoDao.findPicNos(albumNo);
	}
	/*
	 * (non-Javadoc)
	 * @see cn.com.sueframe.service.CompanyInfoService#findAnnonceContent()
	 */
	@Override
	public List<Object> findAnnonceContent() throws SQLException {
		return companyInfoDao.findAnnonceContent();
	}
 /************* anner *********************/
	
	/**
	 * 查找公司顶部图片
	 * 
	 * @author anner
	 * @return void
	 */
	public List<TopPicVO> findTopPic(TopPicVO topPicVO)throws SQLException{
		return companyInfoDao.findTopPic(topPicVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findGoodsByTypeCount(cn.com.sueframe.vo.PageVO)
     */
	@Override
	public int findGoodsByTypeCount(PageVO pageVO) throws SQLException {
		return companyInfoDao.findGoodsByTypeCount(pageVO);
	}
    /*
     * (non-Javadoc)
     * @see cn.com.sueframe.service.CompanyInfoService#findOnlineTool()
     */
	@Override
	public String findOnlineTool() throws SQLException {
		return companyInfoDao.findOnlineTool();
	}

	

	

	
}
